from data import FileIO
from strategy import Strategy
from backtest import Backtest

if __name__=="__main__":
    data = FileIO().read_data(file_path="./data.pkl")
    strategy = Strategy(data)
    start_day = '2015-01-06'
    end_day = '2019-12-30'
    origin_total_value = 10000 # 初始资金
    period = 20 # 回测时间段
    cycle = 3 # 调仓周期
    backtest = Backtest(data,strategy, start_day, end_day, origin_total_value, period, cycle)
    backtest.run()
